package se.teamstat.client.service;

import se.teamstat.client.dto.EntityDTO;
import se.teamstat.client.dto.PlayerDTO;
import se.teamstat.client.service.player.PlayerService;

import com.google.gwt.core.client.GWT;

public class ServiceFactoryImpl implements ServiceFactory {
	
	/* (non-Javadoc)
	 * @see se.teamstat.client.service.ServiceFactory#getService(java.lang.Class)
	 */
	public MainServiceAsync<EntityDTO> getService(Class<? extends EntityDTO> entityClass) {
		if (entityClass.getName().equals(PlayerDTO.class.getName())) {
			return GWT.create(PlayerService.class);
		}
		throw new RuntimeException();
	}
}

	